Skip to content

Conversation

@ubik2
Copy link
Contributor

@ubik2 ubik2 commented Jul 22, 2025

  • Change IStorageProvider API to be URI based intead of EntityId as well as the BaseStorageProvider implementation.
  • Changed the Storage, ProviderConnection, and Provider classes to use URIs.
  • Moved BaseStorageProvider.toEntity into Storage.toURI, since this is the only place it's needed.
  • Updated tests to use cell.getAsNormalizedFullLink to get the URI instead of EntityId.
  • Use await instead of a promise chain in Storage.syncCell.
  • Use URI instead of Entity in a few places, since this is a more useful name (and is already defined in memory/interface.ts).
  • Minor changes to some map key strings (e.g. use '?' as the separator for selectorRef).

Summary by cubic

Replaced a promise chain with async/await in Storage.syncCell and updated type usage from Entity to URI for consistency with memory/interface.ts.

- Use await instead of a promise chain in Storage.syncCell.
- Use URI isntead of Entity, since we also define this in memory/interface.ts.
@ubik2 ubik2 requested a review from seefeldb July 22, 2025 01:21
…ll as the BaseStorageProvider implementation and the Storage class.

Moved BaseStorageProvider.toEntity into Storage.toURI, since this is the only place it's needed.
Changed IStorageProvider to use URI instead of EntityId, as well as the ProviderConnection and Provider classes.
Updated tests to use cell.getAsNormalizedFullLink to get the URI instead of EntityId.
@ubik2 ubik2 changed the title Minor tweaks to call-sync-directly PR Changes to use URI instead of EntityId Jul 22, 2025
@ubik2 ubik2 changed the title Changes to use URI instead of EntityId Changes to use URI instead of EntityId in internal APIs Jul 22, 2025
@seefeldb seefeldb merged commit 88b27ab into call-sync-directly-when-not-in-shim Jul 22, 2025
@seefeldb seefeldb deleted the call-sync-directly-tweaks branch July 22, 2025 14:50
ubik2 added a commit that referenced this pull request Jul 22, 2025
…c calls (#1463)

* feat(runner): call sync directly when not in shim; allow URIs in .sync calls

- Update storage.ts to call sync directly when not running in a shim environment.
- Allow either EntityId or URIs on sync call (eventually we'll deprecate the former)

* cleaner return value

* Changes to use URI instead of EntityId in internal APIs (#1464)

* Minor tweaks
- Use await instead of a promise chain in Storage.syncCell.
- Use URI isntead of Entity, since we also define this in memory/interface.ts.

* Change IStorageProvider API to be URI based instead of EntityId as well as the BaseStorageProvider implementation and the Storage class.
Moved BaseStorageProvider.toEntity into Storage.toURI, since this is the only place it's needed.
Changed IStorageProvider to use URI instead of EntityId, as well as the ProviderConnection and Provider classes.
Updated tests to use cell.getAsNormalizedFullLink to get the URI instead of EntityId.

---------

Co-authored-by: ubik2 <ubik2@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants